# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=tig
pkgver=2.1.1
pkgrel=1
pkgdesc='Text-mode interface for Git.'
depends=('git' 'ncurses')
makedepends=('asciidoc' 'xmlto')
url='http://jonas.nitro.dk/tig/'
license=('GPL')
arch=('i686' 'x86_64')
source=("http://jonas.nitro.dk/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz")
md5sums=('d6eb13d31319d57a3f726d8238f8ebc0')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --build=${CHOST}
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install install-doc-man
  install -Dm0644 contrib/tig-completion.bash "${pkgdir}/usr/share/bash-completion/completions/tig"
}
